from django.db import models

# Create your models here.
class Goods(models.Model):
    goods_imag=models.CharField(verbose_name='产品图片',max_length=128)
    goods_name=models.CharField(verbose_name='产品名称',max_length=128)
    goods_sum=models.IntegerField(verbose_name='产品数量')
    class Meta:
        db_table = 'goods'


from django.utils import timezone

class Ddan(models.Model):
    create_time = models.DateTimeField(default=timezone.now,null=True)
    ddanhao=models.IntegerField(verbose_name='订单号')
    men=models.CharField(verbose_name='收货人',max_length=64)
    moany=models.IntegerField(verbose_name='金额')
    models.ForeignKey(to=Goods,on_delete=models.CASCADE,related_name='goods')

    class Meta:
        db_table = 'ddan'



class Xqing(models.Model):

    pass


class Users(models.Model):
    username=models.CharField(verbose_name='用户名',max_length=64)
    password=models.CharField(verbose_name='密码',max_length=64)

    class Meta:
        db_table = 'users'

